<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="html" uri="struts-html"%>
<%@taglib prefix="mcfn" uri="mcfn" %>
<%@ taglib prefix="c" uri="jstl"%>
<%@ taglib prefix="fn" uri="jstl-fn"%>
<%@taglib prefix="bean" uri="struts-bean" %>

<table align="center" width="990" height="10" cellspacing="0" cellpadding="0" border="3" bordercolor=black bgcolor=white>
            
            <tr>
                <td style="width: 30%;" style="border: none;">
                    <b>Customer Name/Strategic Partner:</b>
                </td>
                <td style="width: 70%;" style="border: none;">
                    ${Campania.tblCuenta.descripcion}
                </td>
            </tr>
            <tr>
                <td colspan="2" style="border: none;">
                    <img src="images/bgMenu.gif" style='width:990px;height:3px;border:0 solid black;'/>
                </td>
            </tr>
            
            <tr>
                <td style="border: none;">
                    <b>Customer Contact: </b>
                    
                </td>
                <td style="border: none;">
                    <table style="width: 100%;" cellpadding="0" border ="1" bordercolor=black bgcolor=white>
                        <tr>
                            <td style="width: 30%;" border="1"><b>Name:</b></td>
                            <td style="width: 70%;" border="1">${Campania.tblUsuario2.nombre} </td>
                        </tr>
                        <tr>
                            <td border="1"><b>Department:</b></td>
                            <td border="1">&nbsp;&nbsp;</td>
                        </tr>
                    </table>
                </td>
            </tr>
            <tr>
                <td colspan="2" style="border: none;">
                    <img src="images/bgMenu.gif" style='width:990px;height:3px;border:0 solid black;'/>
                </td>
            </tr>
            <tr>
                <td style="border: none;">
                    <b>Name of Initiative:</b>  
                </td>
                <td style="border: none;">
                    ${Campania.nombre}
                </td>
            </tr>
            <tr>
                <td colspan="2" style="border: none;">
                    <img src="images/bgMenu.gif" style='width:990px;height:3px;border:0 solid black;'/>
                </td>
            </tr>
            <tr>
                <td style="border: none;">
                    <b>Clear and Full Description of the Mechanics (how the Initiative will work):</b>     
                </td>
                <td style="border: none;">
                    ${Campania.texto}
                </td>
            </tr>
            <tr>
                <td colspan="2" style="border: none;">
                    <img src="images/bgMenu.gif" style='width:990px;height:3px;border:0 solid black;'/>
                </td>
            </tr>
            <tr>
                <td style="border: none;">
                    <b>Marketing Initiative Period:</b>
                </td>
                <td style="border: none;">
                    <table style="width: 100%;" cellpadding="0" border ="1" bordercolor=black bgcolor=white>
                        <tr>
                            <td><b>Event Date:</b></td>
                            <td>&nbsp;&nbsp;</td>
                            <td><b>Results Due Date:</b></td>
                            <td>${mcfn:formatTimestamp(Campania.fechaFin,'dd/MM/yyyy') }</td>
                        </tr>
                        <tr>
                            <td><b>Target Start Date:</b></td>
                            <td>${mcfn:formatTimestamp(Campania.fechaIni,'dd/MM/yyyy') }</td>
                            <td><b>Names Due Date:</b></td>
                            <td>&nbsp;&nbsp;</td>
                        </tr>
                        <tr>
                            <td><b>Target End Date:</b></td>
                            <td>${mcfn:formatTimestamp(Campania.fechaFin,'dd/MM/yyyy') }</td>
                            <td><b>Channel:</b></td>
                            <td>&nbsp;${form.channel}</td>
                        </tr>
                        <tr>
                            <td></td>
                            <td></td>
                            <td><b>Target Public:</b></td>
                            <td>&nbsp;&nbsp;</td>
                        </tr>
                    </table>
                </td>
            </tr>
            <tr>
                <td colspan="2" style="border: none;">
                    <img src="images/bgMenu.gif" style='width:990px;height:3px;border:0 solid black;'/>
                </td>
            </tr>
            <tr>
                <td style="border: none;">
                    <b>Activity Type: (please circle)</b>                    
                </td>
                <td style="border: none;">
                    ${Campania.tblTipoCampania.nombre}
                </td>
            </tr>
            <tr>
                <td colspan="2" style="border: none;">
                    <img src="images/bgMenu.gif" style='width:990px;height:3px;border:0 solid black;'/>
                </td>
            </tr>
            <tr>
                <td style="border: none;">
                    <b>Eligibility:</b>
                </td>
                <td style="border: none;">
                    <table style="width: 100%;" cellpadding="0" border ="1" bordercolor=black bgcolor=white>
                        <tr>
                            <td style="width: 15%;"><b>Employees:</b></td>
                            <td style="width: 30%;">&nbsp;${form.employees}</td>
                            <td style="width: 15%;"><b>Dept/Business Unit:</b></td>
                            <td style="width: 30%;">&nbsp;${form.bcUnit}</td>
                        </tr>
                        <tr>
                            <td><b>Cardholders: </b></td>
                            <td>&nbsp;${form.cardholders}</td>
                            <td><b>Consumer Segment/Product:</b></td>
                            <td>&nbsp;${form.cSegment}</td>
                        </tr>
                        <tr>
                            <td><b>Other:</b></td>
                            <td>&nbsp;&nbsp;</td>
                            <td><b>Define:</b></td>
                            <td>&nbsp;&nbsp;</td>
                        </tr>
                        
                    </table>
                </td>
            </tr>
            <tr>
                <td colspan="2" style="border: none;">
                    <img src="images/bgMenu.gif" style='width:990px;height:3px;border:0 solid black;'/>
                </td>
            </tr>
            <tr>
                <td style="border: none;">
                    <b>Government Approval Required (for Consumer Promotion):</b>
                </td>
                <td style="border: none;">
                    <table style="width: 100%;" cellpadding="0" border ="1" bordercolor=black bgcolor=white>
                        <tr>
                            <td style="width: 20%;"><b>Yes</b></td>
                            <td style="width: 30%;">&nbsp;${form.approvalSI}</td>
                            <td style="width: 20%;"><b>No*</b></td>
                            <td style="width: 30%;">&nbsp;${form.approvalNO}</td>
                        </tr>
                    </table>
                </td>
            </tr>
            <tr>
                <td colspan="2" style="border: none;">
                    <img src="images/bgMenu.gif" style='width:990px;height:3px;border:0 solid black;'/>
                </td>
            </tr>            
<c:set var="AllProductsLength" value="${fn:length(Campania.tblTipoProductos)}" />
<c:set var="TableAssetColPercentage" value="${25}" />
<c:set var="TableProductColPercentage" value="${( 100 - TableAssetColPercentage ) / AllProductsLength }" />

<c:choose>
    <c:when test="${Campania.tblTipoCampania.cveTipoCampania eq 2 }">
        <tr>
            <td style="border: none;">
                <b>New Cards:</b>
            </td>
    <td style="border: none;">
        
        <table width="100%" cellpadding="0" border ="1" bordercolor=black bgcolor=white>
<c:forEach items="${Campania.tblProductos}" var="cpaw" varStatus="cpawStatus" >
            <tr>
                <td><b>Type of Program (${cpawStatus.count}):</b></td>
                <td><b>Business As Usual:</b></td>
                <td><b>Estimated Incremental:</b></td>
                <td><b>Total New Cards:</b></td>
            </tr>
            
            <tr>
                <td>${cpaw.nombre}</td>
                <td>&nbsp;&nbsp;</td>
        <c:forEach items="${Ttp}" var="ttp" varStatus="ttpStatus" >
            <c:if test="${cpawStatus.count eq ttpStatus.count}">
                <td>${ttp}</td>
                <td>${ttp}</td>
            </c:if>
                
        </c:forEach>        
                
            </tr>    
</c:forEach>
        </table>
        
    </td>
</tr>
            <tr>
                <td colspan="2" style="border: none;">
                    <img src="images/bgMenu.gif" style='width:990px;height:3px;border:0 solid black;'/>
                </td>
            </tr>
    </c:when>
    <c:when test="${Campania.tblTipoCampania.cveTipoCampania eq 7 }">
                            <table width="100%" cellpadding="0" border ="1" bordercolor=black bgcolor=white>
                                <tr>
                                    <td colspan="2">
                                        &nbsp;&nbsp;&nbsp;
                                    </td>
                                </tr>
                            </table>                        
    </c:when>            
    <c:otherwise>       
            <tr>
            
            <td style="border: none;">
                <b>GDV:</b>
            </td>
            
            <td style="border: none;">
                
                <table width="100%" cellpadding="0" border ="1" bordercolor=black bgcolor=white>
<c:forEach items="${Campania.tblProductos}" var="cpaw" varStatus="cpawStatus" >
            <tr>
                <td><b>Type of Program (${cpawStatus.count}):</b></td>
                <td><b>Business As Usual:</b></td>
                <td><b>Estimated Incremental:</b></td>
                <td><b>Total New Cards:</b></td>
            </tr>
            
            <tr>
                <td>${cpaw.nombre}</td>
                <td>&nbsp;&nbsp;</td>
       <c:forEach items="${Campania.tblCampaniaProductoUsuarios}" var="cpu" varStatus="cpuStatus" >
            <c:if test="${cpu.tblProducto.cveProducto eq cpaw.cveProducto}">
                <td><b>US$</b>&nbsp;&nbsp;${cpu.gdvTotalDelProducto}</td>
                <td><b>US$</b>&nbsp;&nbsp; ${cpu.gdvTotalDelProducto}</td>
            </c:if>                
        </c:forEach>

                
            </tr>    
</c:forEach>
                </table>
                
            </td>
            
        </tr>
            <tr>
                <td colspan="2" style="border: none;">
                    <img src="images/bgMenu.gif" style='width:990px;height:3px;border:0 solid black;'/>
                </td>
            </tr>							 	
    </c:otherwise>
</c:choose>                                                      
                       
<tr>
    <td style="border: none;"> <b>Target Assumptions Rationale:</b> </td>
    <td style="border: none;"> &nbsp; ${form.assumptions}  </td>
</tr>
<tr>
                <td colspan="2" style="border: none;">
                    <img src="images/bgMenu.gif" style='width:990px;height:3px;border:0 solid black;'/>
                </td>
            </tr>
<tr>
    <td style="border: none;"> <b> MasterCard Support: </b> </td>
    
    <td style="border: none;">
        
        <table width="100%" cellpadding="0" border ="1" bordercolor=black bgcolor=white>
            <tr>
                <td width="50%"><b>Asset</b></td>
                <td width="50%"><b>Packages</b></td>
            </tr>
            
<c:forEach items="${AssetS}" var="asset" varStatus="assetStatus">
            <tr>
                <td>${asset.nombre}</td>
                <td>${asset.quantityOfPackage }</td>
            </tr>
</c:forEach>

<c:set value="${fn:length(Campania.tblPaquetes)}" var="paketes"/>

            
            <tr>
                <td> <b> Budget Origin </b> </td>
                <td>&nbsp;${form.budget}</td>
            </tr>
            
            <tr>
                <td> <b> # of Assets (Tickets) </b> </td>
                <td> ${paketes} </td>
            </tr>
            
        </table>
        
    </td>
    
</tr>
<tr>
                <td colspan="2" style="border: none;">
                    <img src="images/bgMenu.gif" style='width:990px;height:3px;border:0 solid black;'/>
                </td>
            </tr>
<tr>
    <td style="border: none;"> <b> Confirmation of Customer Contribution:  </b> </td>
    <td style="border: none;">
        
        <table width="100%" cellpadding="15" border ="1" bordercolor=black bgcolor=white>
            <tr>
                <td width="30%"><b>Estimated Implementation Costs US$</b></td>
                <td width="70%">&nbsp;&nbsp;</td>
            </tr>
        </table>
        
    </td>
</tr>
<tr>
                <td colspan="2" style="border: none;">
                    <img src="images/bgMenu.gif" style='width:990px;height:3px;border:0 solid black;'/>
                </td>
            </tr>
<tr>
    <td colspan="2" style="border: none;">
            <table width="100%" cellpadding="0" border ="1" bordercolor=black bgcolor=white>
                
                <tr>
    <td width="50%">
        <b> Details of Investment (please comment and identify type of investment 
            - communication costs: radio / tv / direct mail, travel expenses, any other additional  </b>
    </td>
    <td width="50%"> &nbsp;&nbsp; </td>
</tr>

<tr>
    <td width="50%"> <b> MasterCard: </b> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </td>
    <td width="50%"> <b> Strategic Partner: </b> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </td>
</tr>
<tr>
    <td width="50%"> <b> MasterCard International Incorporated </b> </td>
    <td width="50%"> <b> Insert Legal Entity Name </b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;${Campania.tblCuenta.descripcion} </td>
</tr>
<tr>
    <td width="50%"> <b> By: </b> </td>
    <td width="50%"> <b> By: </b> </td>
</tr>
<tr>
    <td width="50%"> <b> Print Name: </b> </td>
    <td width="50%"> <b> Print Name: </b> </td>
</tr>
<tr>
    <td width="50%"> <b> Print Title: </b> </td>
    <td width="50%"> <b> Print Title: </b> </td>
</tr>
<tr>
    <td width="50%"> <b> Date: </b> </td>
    <td width="50%"> <b> Date: </b> </td>
</tr>
<tr>
    <td width="50%"> <b>  </b> </td>
    <td width="50%"> <b> Strategic Partner TIN: </b> </td>
</tr>
<tr>
    <td width="50%"> <b>  </b> </td>
    <td width="50%"> <b> Strategic Partner Parnter Address: </b> </td>
</tr>
                
            </table>
    </td>
</tr>

        </table>

<table width="990" cellpadding="0" border ="0" align="center" >
            <tr>
                <td width="50%" align="center">
            <html:form method="post" styleId="FlowProcessForm" action="/FlowProcess" enctype="multipart/form-data">
                <html:hidden property="cveWorkPreimplementation" styleId="cveWorkPreimplementation" value="${form.cveWorkPreimplementation}" />
                <html:image src="images/btnRegresar.gif"/>                
            </html:form>
                </td>
                <td width="50%" align="center">
                    <html:image src="images/btnGuardar.gif" onclick="javascript:window.print( ) ;"/>
                </td>                
            </tr>
            
        </table>